apiVersion: apps/v1
kind: Deployment
metadata:
  name: booking-service
spec:
  replicas: 3
  selector:
    matchLabels:
      app: booking-service
  template:
    metadata:
      labels:
        app: booking-service
    spec:
      containers:
        - name: booking-service
          image: booking-service:latest
          ports:
            - containerPort: 8080
          env:
            - name: SERVER_PORT
              valueFrom:
                configMapKeyRef:
                  name: booking-service-config
                  key: SERVER_PORT
            - name: LOG_LEVEL
              valueFrom:
                configMapKeyRef:
                  name: booking-service-config
                  key: LOG_LEVEL
